package com.sqx.modules.ruleClassify.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.SqlCondition;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @description rule_classify
 * @author fang
 * @date 2022-08-09
 */
@Data
public class RuleClassify implements Serializable {

    private static final long serialVersionUID = 1L;


    /**
     * 机械分类id
     */
    @TableId(type = IdType.AUTO)
    private Long ruleClassifyId;

    /**
     * 机械名称
     */
    @TableField(condition = SqlCondition.LIKE)
    private String ruleClassifyName;


    /**
     * 状态 1上架 2下架
     */
    private Integer status;

    /**
     * 排序
     */
    private Integer sort;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * 上级id
     */
    private Long parentId;
    @TableField(exist = false)
    private List<RuleClassify> childrens;

    public RuleClassify() {}
}
